package service.pqueue;

import java.io.FileInputStream;
import java.util.Properties;

public class QServerContext {
	public static int SERVER_PORT = 12800;
	public static String SERVER_TYPE = "1";

	static {
		Properties prop = new Properties();
		try {
			String path = Thread.currentThread().getContextClassLoader()
					.getResource("conf/qserver.properties").getPath();
			prop.load(new FileInputStream(path));

			SERVER_TYPE = prop.getProperty("queue.server.type").trim();
			SERVER_PORT = Integer.parseInt(prop
					.getProperty("queue.server.port"));

		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}
}
